<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>留存配置列表</title>

<link href="/resources/js/easyui-1.4/themes/default/easyui.css" rel="stylesheet"/>
<script type="text/javascript" src="/resources/js/easyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/resources/js/easyui-1.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/resources/js/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/resources/js/easyui/jquery.edatagrid.js"></script>
</head>
<body class="cmp-list-body">
<div id="tb" style="padding:3px">
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:$('#tt').edatagrid('saveRow')">保存</a>
</div>
<table id="tt" title="留存列表" iconCls="icon-save" toolbar="#tb" rownumbers="true" idField="id" url="/customization/retentList?mark=${mark}"
    selectOnCheck="true" singleSelect="false" pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]"
    data-options="onClickRow: function (rowIndex, rowData) {$(this).datagrid('unselectRow', rowIndex);}"> 
    <thead>
        <tr>
            <th field='retentDay' width=30%>留存天数</th>
            <th field='referenceRate' width=30%>参考留存值</th>
            <th field='retentRate' width=30% data-options="editor:{type:'numberbox'}">实际留存值</th>
        </tr>

    </thead>   
</table>
<form id="ff" method="post"></form>
<script>

    $(function(){
         var data1 = [
            {"retentDay": "1","referenceRate": "68.4","retentRate": ""},
            {"retentDay": "2","referenceRate": "58.7","retentRate": ""},
            {"retentDay": "3","referenceRate": "43.8","retentRate": ""},
            {"retentDay": "4","referenceRate": "39.4","retentRate": ""},
            {"retentDay": "5","referenceRate": "35.5","retentRate": ""},
            {"retentDay": "6","referenceRate": "31.9","retentRate": ""},
            {"retentDay": "7","referenceRate": "30.8","retentRate": ""},
            {"retentDay": "8","referenceRate": "24.6","retentRate": ""},
            {"retentDay": "9","referenceRate": "22.2","retentRate": ""},
            {"retentDay": "10","referenceRate": "20.3","retentRate": ""},
            {"retentDay": "11","referenceRate": "18.1","retentRate": ""},
            {"retentDay": "12","referenceRate": "17.2","retentRate": ""},
            {"retentDay": "13","referenceRate": "13.8","retentRate": ""},
            {"retentDay": "14","referenceRate": "12.4","retentRate": ""},
            {"retentDay": "15","referenceRate": "12.1","retentRate": ""},
            {"retentDay": "16","referenceRate": "7.6","retentRate": ""},
            {"retentDay": "17","referenceRate": "5.2","retentRate": ""},
            {"retentDay": "18","referenceRate": "4.4","retentRate": ""},
            {"retentDay": "19","referenceRate": "4.1","retentRate": ""},
            {"retentDay": "20","referenceRate": "3.9","retentRate": ""},
            {"retentDay": "21","referenceRate": "3.8","retentRate": ""},
            {"retentDay": "22","referenceRate": "2.8","retentRate": ""},
            {"retentDay": "23","referenceRate": "2.4","retentRate": ""},
            {"retentDay": "24","referenceRate": "2.4","retentRate": ""},
            {"retentDay": "25","referenceRate": "1.2","retentRate": ""},
            {"retentDay": "26","referenceRate": "0.4","retentRate": ""},
            {"retentDay": "27","referenceRate": "0.4","retentRate": ""},
            {"retentDay": "28","referenceRate": "0.2","retentRate": ""}
        ];
        var tt = $('#tt').datagrid({
                data: data1
            });
         $('#tt').edatagrid({
            /*updateUrl: '/paycodeOpen/update?json',
            url: '/paycodeOpen/list?json',
            rowStyler:function(index,row){   
                if (row.spDailyLimitUsed >= row.spDailyLimit || row.spMonthLimitUsed >= row.spMonthLimit){   
                    return 'background-color:#FFF;color:#FFA0A0;font-weight:bold;';   
                }  
            }, 
            onHeaderContextMenu: function(e, field){
                e.preventDefault();
                if (!cmenu){
                    createColumnMenu();
                }
                cmenu.menu('show', {
                    left:e.pageX,
                    top:e.pageY
                });
            }*/
         });
    });
</script>
</body>
</html>